<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Admin</title>

    <!-- Bootstrap Core CSS -->
    <link href="./lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="./lib/bootstrap/css/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="./less/sb-admin-2.min.css" rel="stylesheet">
    <link rel="stylesheet" href="./less/my-sb-admin.css">

    <!-- Custom Fonts -->
    <link href="./fonts/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="./lib/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="./lib/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

<div id="wrapper">
    <!-- Navigation -->
    <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="index.html" id="navbar-brand">jiaoshou <!--todo motive--></a>
        </div>
        <!-- /.navbar-header -->

        <ul class="nav navbar-top-links navbar-right">
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-envelope fa-fw"></i> <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-messages">
                    <li>
                        <a href="#">
                            <div>
                                <strong>John Smith</strong>
                                <span class="pull-right text-muted">
                                        <em>Yesterday</em>
                                    </span>
                            </div>
                            <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...</div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <strong>John Smith</strong>
                                <span class="pull-right text-muted">
                                        <em>Yesterday</em>
                                    </span>
                            </div>
                            <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...</div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <strong>John Smith</strong>
                                <span class="pull-right text-muted">
                                        <em>Yesterday</em>
                                    </span>
                            </div>
                            <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...</div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a class="text-center" href="#">
                            <strong>Read All Messages</strong>
                            <i class="fa fa-angle-right"></i>
                        </a>
                    </li>
                </ul>
                <!-- /.dropdown-messages -->
            </li>
            <!-- /.dropdown -->
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-tasks fa-fw"></i> <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-tasks">
                    <li>
                        <a href="#">
                            <div>
                                <p>
                                    <strong>Task 1</strong>
                                    <span class="pull-right text-muted">40% Complete</span>
                                </p>
                                <div class="progress progress-striped active">
                                    <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
                                        <span class="sr-only">40% Complete (success)</span>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <p>
                                    <strong>Task 2</strong>
                                    <span class="pull-right text-muted">20% Complete</span>
                                </p>
                                <div class="progress progress-striped active">
                                    <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
                                        <span class="sr-only">20% Complete</span>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <p>
                                    <strong>Task 3</strong>
                                    <span class="pull-right text-muted">60% Complete</span>
                                </p>
                                <div class="progress progress-striped active">
                                    <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
                                        <span class="sr-only">60% Complete (warning)</span>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <p>
                                    <strong>Task 4</strong>
                                    <span class="pull-right text-muted">80% Complete</span>
                                </p>
                                <div class="progress progress-striped active">
                                    <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
                                        <span class="sr-only">80% Complete (danger)</span>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a class="text-center" href="#">
                            <strong>See All Tasks</strong>
                            <i class="fa fa-angle-right"></i>
                        </a>
                    </li>
                </ul>
                <!-- /.dropdown-tasks -->
            </li>
            <!-- /.dropdown -->
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-bell fa-fw"></i> <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-alerts">
                    <li>
                        <a href="#">
                            <div>
                                <i class="fa fa-comment fa-fw"></i> New Comment
                                <span class="pull-right text-muted small">4 minutes ago</span>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <i class="fa fa-twitter fa-fw"></i> 3 New Followers
                                <span class="pull-right text-muted small">12 minutes ago</span>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <i class="fa fa-envelope fa-fw"></i> Message Sent
                                <span class="pull-right text-muted small">4 minutes ago</span>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <i class="fa fa-tasks fa-fw"></i> New Task
                                <span class="pull-right text-muted small">4 minutes ago</span>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <i class="fa fa-upload fa-fw"></i> Server Rebooted
                                <span class="pull-right text-muted small">4 minutes ago</span>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a class="text-center" href="#">
                            <strong>See All Alerts</strong>
                            <i class="fa fa-angle-right"></i>
                        </a>
                    </li>
                </ul>
                <!-- /.dropdown-alerts -->
            </li>
            <!-- /.dropdown -->
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-user">
                    <li><a href="#"><i class="fa fa-user fa-fw"></i> User Profile</a>
                    </li>
                    <li><a href="#"><i class="fa fa-gear fa-fw"></i> Settings</a>
                    </li>
                    <li class="divider"></li>
                    <li><a href="login.html"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
                    </li>
                </ul>
                <!-- /.dropdown-user -->
            </li>
            <!-- /.dropdown -->
        </ul>
        <!-- /.navbar-top-links -->

        <div class="navbar-default sidebar" role="navigation">
            <div class="sidebar-nav navbar-collapse">
                <ul class="nav" id="side-menu">
                    <li class="sidebar-search">
                        <div class="input-group custom-search-form">
                            <input type="text" class="form-control" placeholder="Search...">
                            <span class="input-group-btn">
                                <button class="btn btn-default" type="button">
                                    <i class="fa fa-search"></i>
                                </button>
                            </span>
                        </div>
                        <!-- /input-group -->
                    </li>
                    <li>
                        <a href="javascript:;" id="posts_manage"><i class="fa fa-dashboard fa-fw"></i> Back-stage Management</a>
                    </li>
                    <li>
                        <a href="javascript:;" id="user_manage"><i class="fa fa-table fa-fw"></i>User-Management</a>
                    </li>
                </ul>
            </div>
            <!-- /.sidebar-collapse -->
        </div>
        <!-- /.navbar-static-side -->
    </nav>

    <!--main structure-->
    <div class="page-wrapper" id="page-wrapper">
        <!--title-->
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">Back-stage Management</h1>
            </div>
        </div>
        <!--table-->
        <div class="row">
            <!--标题-->
            <div class="panel panel-default">
                <div class="panel-heading"><i class="fa fa-hand-lizard-o"></i>&nbsp;<span>Post Management</span></div>

                <div class="table_function">
                    <!--添加帖子按钮-->
                    <button type="button"  id="add_text" class="btn btn-default" data-toggle="modal" data-target="#editArea">
                        Add
                    </button>

                    <!--搜索框-->
                    <div class="row" style="margin-top: 10px;">
                        <div class="col-lg-12">
                            <div class="input-group">
                                <input type="text" class="form-control" placeholder="Search for..." id="search-input">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" id="search-post" type="button">search</button>
                                </span>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="panel-body">
                    <!-- Table -->
                    <table class="table table-bordered table-striped table-hover" id="post_table">
                        <thead>
                            <tr>
                                <td>serial number</td>
                                <td>author</td>
                                <td>title</td>
                                <td>operation</td>
                            </tr>
                        </thead>
                        <tbody id="list_box">
                            <!--todo listTemplate Box-->
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>



    <!--弹出框-->
    <!--添加帖子弹出框-->
    <div class="modal fade" id="editArea" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">Edit post</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <lable for="add-title" id="add-title-lable">标题</lable>
                        <input type="text" class="form-control" id="add-title" name="add-input"><!--标题/username/id-->
                    </div>
                    <div class="form-group">
                        <lable for="add-title" id="add-password-lable">Password</lable>
                        <input type="text" class="form-control" id="add-password" name="add-input"><!--password-->
                    </div>
                    <div class="form-group">
                        <lable for="add-content" id="add-content-lable">内容</lable>
                        <button id="switch-html" class="switch-btn">HTML</button>
                        <div id="add-content" contenteditable=true></div><!--编辑帖子内容/nickname-->
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    <button type="button" class="btn btn-primary" id="add-post">Save</button>
                </div>
            </div>
        </div>
    </div>

    <!--提示弹出框/确认删除-->
    <div class="alert_module">
        <p>Are you sure?</p>
        <button id="delete-sure">Sure</button>
        <button id="delete-notsure">Not Sure</button>
    </div>
    <!--纯提示框-->
    <div class="alert_module2">
        <p class="msg"></p>
    </div>
</div>


<!-- jQuery -->
<script src="./lib/jquery/jquery.min.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="./lib/bootstrap/js/bootstrap.min.js"></script>

<!--art Template-->
<script src="./lib/artTemplate/template.js"></script>

<!-- Metis Menu Plugin JavaScript -->
<script src="./js/metisMenu.min.js"></script>

<!-- Custom Theme JavaScript -->
<script src="./js/sb-admin-2.min.js"></script>

<!--Get Ajax Url-->
<script src="./js/myUrl.js"></script>

<!--Custom javascript-->
<script src="./js/custom_sbadmin.js"></script>

<!--html posts template-->
<script type="text/html" id="template_table">
    {{each list as v i}}
    <tr listid ={{v.id}}>
        <td>{{i+1}}</td>
        <td>{{v.nickname}}</td>
        <td>{{v.title}}</td>
        <!--编辑，删除按钮组-->
        <td>
            <!--编辑-->
            <button type="button" class="btn btn-primary btn-md btn-edit" data-toggle="modal" data-target="#editArea">Edit</button>
            <button type="button" class="btn btn-primary btn-md btn-delete" data-toggle="modal" data-target="#myModal">Delete</button>
        </td>
    </tr>
    {{/each}}
</script>

<!--html user template-->
<script type="text/html" id="template_usertable">
    {{each list as v i}}
    <tr listid ={{v.id}}>
        <td>{{v.nickname}}</td>
        <td>{{v.username}}</td>
        <td>{{v.password}}</td>
        <!--编辑，删除按钮组-->
        <td>
            <!--编辑-->
            <button type="button" class="btn btn-primary btn-md btn-edit" data-toggle="modal" data-target="#editArea">Edit</button>
            <button type="button" class="btn btn-primary btn-md btn-delete" data-toggle="modal" data-target="#myModal">Delete</button>
        </td>
    </tr>
    {{/each}}
</script>
</body>

</html>
